package one.stand.model;

import lombok.Data;
import org.springframework.util.StringUtils;

import java.io.Serializable;
import java.util.List;

/**
 * @author Administrator
 */
@Data
public class CommentModel extends BaseModel implements Serializable {
    private Integer commentId;

    private Integer dynamicId;

    private Integer type;

    private Integer userId;

    private Integer parentId;

    private String text;

    private String userName;

    /**
     * 被回复者id
     */
    private Integer coverUserId;

    private Integer companyId;

    private Integer companyUserId;

    private String replyName;

    private String limits;

    private Integer cardId;

    private List<CommentModel> commentModelList;

    public String getUserName() {
        return StringUtils.isEmpty(userName)?"":new String(java.util.Base64.getDecoder().decode(userName));
    }

    public String getReplyName(){
        return StringUtils.isEmpty(replyName)?"":new String(java.util.Base64.getDecoder().decode(replyName));
    }
}